<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8"/>
    <meta http-equiv="Access-Control-Allow-Origin" content="http://localhost:8080"/>
    <title>attr例子</title>
    <link href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet">

</head>

<body>
<div class="container">
    <img src="xx" h-attr="src={img.src},title={img.title},alt={img.title}">
</div>

</div>

<!--<script src="http://cdn.bootcss.com/zepto/1.1.6/zepto.js"></script>-->
<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
<!--去掉下面两个js可以预览静态效果-->
<script type='text/javascript' src="../domTemplate.js"></script>
<script type='text/javascript' src="../dt.template.js"></script>
<script type='text/javascript' src="../dt.helpers.js"></script>
<script type="text/javascript">
    $(function () {
        $.domTemplate.init({data:{img:{src:'http://www.wed114.cn/jiehun/uploads/allimg/160426/39_160426110624_1.jpg',title:'测试标题'}}});
    });

</script>

</body>
</html>